added errorhandling if ARGV[0] is nil