Fix a bug with ps.file