Specify class on exception
Use File.dirname
Fix class name
Clean up blocks