Null checks and file path change