Be more graceful with loading files and directories