added File.close and fixed the parsing for openmode