Honor job dependencies
Catch OSError
Don't use reserved word "file" for variable
Add a few newlines for improved readability
Make logging at level debug configurable