allow file and dir as argument