Added a few more optional parameters.
STDERR causes automatic exit(1), file checks and fatal error fix.