Failing to write returns false not 0