improved check for autoload file