Refactored to working state for file