increase char file_mode[1] size to 2 to have space for terminating zero