Fixed bug for linux, filename has to be c_string in file.open