ake sure to correctly increment file pointer, remove debug