Better file checking and more runtime handling