Move return inside conditional
Initialize $contents