Refactored check_l method to simplify code
Added standard error and output paths to PbsJob