fixed fileio, added tests for options