Accidentally fixed delete() while debugging. Added curpos variable that is set to lseek to current position. Which shouldn't do anything. But does. It works now