Moved to relative path for passcode file
Replaced console.log with generic logging function
Converted tabs to spaces for readability