Fixed wrong filemode