write file accomplished

tricky with finding the correct placement of where you need to look,
one simple 0 or 1 can throw you off!