Fix a bug in setFileStatus
Work on the testing