>At some times I have to enter the same order line several times before it is saved
So is the order supposed to be saved to a common file or a newly created file per order?
Seems to me it's a permission problem if the order is not saved at all times. But it's not a definite case since you mentioned you can get around by entering the order several times...
Anyway, I suggest you to first check the file permission, make sure it's 666 (-rw-rw-rw-).