BASIC IO FINISHED

- initialization now depends on mode
- only one buffer allocated
- working fclose
- improved error checking
- proper previous file pointer initialization